﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.XPath;

namespace Landscape {
    public interface IXSLCompiler {
        /// <summary>
        /// Creates a compiled xslt stylesheet from an XmlDocument
        /// </summary>
        /// <param name="stylesheet">The XmlDocument containing the stylesheet</param>
        /// <returns>A compiled version of the xsl stylesheet</returns>
        object Compile(XmlDocument stylesheet);

        /// <summary>
        /// Transforms an XPath Document using the specified compiled stylesheet
        /// </summary>
        /// <param name="dataSource">The source XPath document</param>
        /// <param name="compiledTransform">A compiled version of the xsl stylesheet</param>
        /// <param name="templateParams">A dictionary of parameters supplied to the stylesheet</param>
        /// <returns>A stream containing the transformed content</returns>
        System.IO.MemoryStream Transform(XPathDocument dataSource, object compiledTransform, IDictionary<string, object> templateParams);
    }
}
